package cn.kgc.dto;

import cn.kgc.common.annotation.CheckAnnotation;
import lombok.*;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;

/**
 * <p>添加描述信息</p>
 *
 * @author 石浩杰
 * @since 2022年09月26日 8:34
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@CheckAnnotation
public class AddSysUserDTO {

    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String email;

    @NotBlank(message = "用户名不为空")
    private String name;
    @Length(min = 6,max = 6,message = "密码长度必须在6到20位之间")
    private String password1;
    @Length(min = 6,max = 6,message = "确认密码长度必须在6到20位之间")
    private String password2;

    @NotBlank(message = "aaaa")
    private void method1(String str){
        System.out.println("执行method1获得str的值:"+str);
    }
}
